home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
T-COMAL Today
/
(k)t2.d64
/
help-comal
< prev
next >
Wrap
Text File
|
2007-02-28
|
7KB
|
322 lines
├╧═┴╠ ╦┼┘╫╧╥─╙: (VERSION 0.14)
// -- ALLOWS COMMENTS IN A PROGRAM
//█<ANYTHING>▌
┴┬╙ -- GIVES THE ABSOLUTE VALUE
┴┬╙(<NUMERIC EXPRESSION>)
┴╬─ -- LOGICAL ┴╬─
<EXPRESSION> ┴╬─ <EXPRESSION>
┴╨╨┼╬─ -- START AT END OF SEQ FILE
╧╨┼╬ █╞╔╠┼▌ <FILE#>,<FILENAME>,┴╨╨┼╬─
┴╘╬ -- ARCTANGENT IN RADIANS
┴╘╬(<NUMERIC EXPRESSION>)
┴╒╘╧ -- AUTOMATIC LINE NUMBERING
┴╒╘╧ █<START LINE>▌█,<INCREMENT>▌
┬┴╙╔├ -- BACK INTO ┬┴╙╔├ MODE
┬┴╙╔├
├┴╙┼ -- MULTIPLE CHOICE DECISIONS
├┴╙┼ <CONTROL EXPRESSION> █╧╞▌
├┴╘ -- GIVES DISK DIRECTORY
├┴╘ █<DRIVE NUMBER>▌
├╚┴╔╬ -- LOAD & RUN PROGRAM ON DISK
├╚┴╔╬ <FILENAME>
├╚╥$ -- GIVES THAT NUMBERS CHARACTER
├╚╥$(<NUMERIC EXPRESSION>)
├╠╧╙┼ -- CLOSES FILES
├╠╧╙┼ ██╞╔╠┼▌ <FILENUM>▌
├╠╧╙┼─ -- ALL PROC/FUNC VARIABLES LOCAL
╨╥╧├ <PROCNAME>█(PARAMS)▌ █├╠╧╙┼─▌
╞╒╬├ <FUNCNAME>█(PARAMS)▌ █├╠╧╙┼─▌
├╧╬ -- CONTINUE PROGRAM EXECUTION
├╧╬
├╧╙ -- COSINE IN RADIANS
├╧╙(<NUMERIC EXPRESSION>)
─┴╘┴ -- PROVIDES DATA FOR A ╥┼┴─
─┴╘┴ <VALUE>█,<VALUE>▌█,...▌
─┼╠ -- DELETES LINES
─┼╠ <RANGE>
─┼╠┼╘┼ -- DELETES A FILE FROM DISK
─┼╠┼╘┼ <FILENAME>
─╔═ -RESERVE/ALLOCATE STRING/ARRAY SPAC
─╔═ <STRING VAR> ╧╞ <MAX CHAR>
─╔═ <STR ARRAY>(<INDEX>) ╧╞ <MAX CHAR>
─╔═ <ARRAY NAME>(<INDEX>)
─╔╓ -- DIVISION WITH INTEGER ANSWER
<DIVIDEND> ─╔╓ <DIVISOR>
─╧ -- DO THE FOLLOWING STATEMENTS
─╧ <STATEMENTS>
┼─╔╘ -- LIST LINES WITHOUT INDENTATIONS
┼─╔╘ █<RANGE>▌
┼╠╔╞ -- SHORT FOR ┼╠╙┼ ╔╞ CONDITION
┼╠╔╞ <EXPRESSION> █╘╚┼╬▌
┼╠╙┼ -ALTERNATIVE ╔╞ STRUC STATEMENTS
┼╠╙┼
┼╬─ -- HALT PROGRAM EXECUTION
┼╬─
┼╬─├┴╙┼ -- END OF ├┴╙┼ STRUCTURE
┼╬─├┴╙┼
┼╬─╞╧╥ -- END OF ╞╧╥ STRUCTURE
┼╬─╞╧╥ █<CONTROL VARIABLE>▌
┼╬─╞╒╬├ -- END OF FUNCTION
┼╬─╞╒╬├ █<FUNCTION NAME>▌
┼╬─╔╞ -- END OF ╔╞ STRUCTURE
┼╬─╔╞
┼╬─╨╥╧├ -- END OF PROCEDURE
┼╬─╨╥╧├ █<PROCEDURE NAME>▌
┼╬─╫╚╔╠┼ -- END OF ╫╚╔╠┼ STRUCTURE
┼╬─╫╚╔╠┼
┼╬╘┼╥ --MERGE PROGRAM SEGMENT FROM DISK
┼╬╘┼╥ <FILENAME>
┼╧─ -- ┼ND ╧F ─ATA FLAG
┼╧─
┼╧╞ -- ┼ND ╧F ╞ILE FLAG
┼╧╞(<FILENUM>)
┼╙├ -- STOP KEY PRESSED FLAG
┼╙├
╘╥┴╨ ┼╙├<TYPE>
┼╪┼├ -- EXECUTE A PROCEDURE
█┼╪┼├▌ <PROCNAME>█(<PARAMETER LIST>)▌
┼╪╨ -- NATURAL LOG E TO N
┼╪╨(<NUMERIC EXPRESSION>)
╞┴╠╙┼ -- PREDEFINED VALUE = 0
╞┴╠╙┼
╞╔╠┼ -- SPECIFIES A FILE IS TO BE USED
╔╬╨╒╘ ╞╔╠┼ <FILE#>█,<REC#>▌: <VARLIST>
╨╥╔╬╘ ╞╔╠┼ <FILE#>█,<REC#>▌: <VALLIST>
╥┼┴─ ╞╔╠┼ <FILE#>█,<REC#>▌: <VAR LIST>
╫╥╔╘┼ ╞╔╠┼ <FILE#>█,<REC#>▌: <VARLIST>
╧╨┼╬ █╞╔╠┼▌ <FILE#>,<FILENAM>█,<TYPE>▌
├╠╧╙┼ ██╞╔╠┼▌ <FILE#>▌
╞╧╥ -- START OF ╞╧╥ LOOP STRUCTURE
╞╧╥ <VAR>:=<START> ╘╧ <END> █╙╘┼╨ <S>▌
╞╒╬├ -- START OF A MULTILINE FUNCTION
╞╒╬├ <NAME>█(<PARAMS>)▌ █├╠╧╙┼─▌
╟╧╘╧ -- GO TO LINE WITH THIS NAME
╟╧╘╧ <LABEL NAME>
╔╞ -- START OF CONDITIONAL ╔╞ STRUCTURE
╔╞ <CONDITION> █╘╚┼╬▌
╔╞ <CONDITION> ╘╚┼╬ <STATEMENT>
╔╬ -- LOCATE STRING1 WITHIN STRING2
<STRING1> ╔╬ <STRING2>
╔╬╨╒╘ -- INPUT FROM KEYBOARD OR FILE
╔╬╨╒╘ █<PROMPT>:▌ <VAR LIST>
╔╬╨╒╘ ╞╔╠┼ <FILE#>█,<REC#>▌:<VAR LIST>
╔╬╘ -NEAREST INTEGER LESS THAN OR EQUAL
╔╬╘(<NUMERIC EXPRESSION>)
╦┼┘$ -SCAN KEYBOARD(NOT ╨┼╘ ├╧═┴╠ 0.14)
╦┼┘$
╠┴┬┼╠ -- ASSIGN LABEL NAME TO THE LINE
<LABEL NAME>:
╠┼╬ -- GIVES THE LENGTH OF STRING
╠┼╬(<STRING EXPRESSION>)
╠┼╘ -- ASSIGN VALUE TO VARIABLE
:= OR :+ OR :-
╠╔╙╘ -- LIST PROGRAM
╠╔╙╘ █<RANGE>▌ █<FILENAME>▌
╠╧┴─ -- LOAD A PROGRAM FROM DISK
╠╧┴─ <FILENAME>
╠╧╟ -- NATURAL LOGARITHM OF N
╠╧╟(<NUMERIC EXPRESSION>)
═╧─ -- REMAINDER OF DIVISION (MODULO)
<DIVIDEND> ═╧─ <DIVISOR>
╬┼╫ -- CLEARS PROGRAM FROM MEMORY
╬┼╫
╬╧╘ -- LOGICAL ╬╧╘
╬╧╘ <CONDITION>
╬╒╠╠ -- DOES NOTHING (NO OP)
╬╒╠╠
╧╞ -- PART OF ─╔═ OR ├┴╙┼ STRUCTURE
├┴╙┼ <EXPRESSION> █╧╞▌
─╔═ <STRINGVAR> ╧╞ <MAX CHAR>
─╔═ <STRINGARRAY>(INDEX) ╧╞ <MAX CHAR>
╧╨┼╬ -- OPEN A FILE
╧╨┼╬ █╞╔╠┼▌ <FILE#>,<FILENAM>█,<TYPE>▌
╧╥ -- LOGICAL ╧╥
<CONDITION> ╧╥ <CONDITION>
╧╥─ -RETURN INTEGER REPRESENTING CHAR
╧╥─(<STRING EXPRESSION>)
╧╘╚┼╥╫╔╙┼ -- DEFAULT FOR ├┴╙┼
╧╘╚┼╥╫╔╙┼
╧╒╘╨╒╘ -- SELECT OUTPUT LOCATION
╙┼╠┼├╘ █╧╒╘╨╒╘▌ <TYPE>
╨┴╙╙ --PASS STRING TO DISK COMMAND CHAN
╨┴╙╙ <DISK COMMAND>
╨┼┼╦ -- LOOK AT MEMORY
╨┼┼╦(<MEMORY ADDRESS>)
╨╧╦┼ -- CHANGE MEMORY LOCATION
╨╧╦┼ <MEMORY ADDRESS>,<CONTENTS>
╨╥╔╬╘ -PRINT ITEMS TO SCREEN/PRINT/FILE
╨╥╔╬╘ █╞╔╠┼ <#>:▌ █<ITEMS>▌
╨╥╔╬╘ █╞╔╠┼ <#>:▌ ╒╙╔╬╟ <FORMAT>:<VAR>
(╥┴╬─╧═ FILE USE: █╞╔╠┼ <#>,<REC#>:▌)
╨╥╧├ -- START OF MULTILINE PROCEDURE
╨╥╧├ <NAME>█(<PARAMS>)▌ █├╠╧╙┼─▌
╥┴╬─╧═ -- RANDOM ACCESS DISK FILE
╧╨┼╬ ╞╔╠┼ <#>,<FILENAM>,╥┴╬─╧═ <RECLN>
╥┼┴─ --READ DATA FROM ─┴╘┴ LINE OR FILE
╥┼┴─ <VAR LIST>
╥┼┴─ ╞╔╠┼ <FILE#>█,<REC#>▌: <VAR LIST>
╧╨┼╬ █╞╔╠┼▌ <FILENUM>,<FILENAME>,╥┼┴─
╥┼╞ -PARM VAR USED IN REFERENCE IN PROC
╥┼╞ <VAR>
╥┼╬╒═ -- RENUMBER PROGRAM
╥┼╬╒═ █<TARGETSTART>▌█,<INCREMENT>▌
╥┼╨┼┴╘ -- START OF ╥┼╨┼┴╘ STRUCTURE
╥┼╨┼┴╘
╥┼╙╘╧╥┼ -- REUSE ─┴╘┴ WITH ╥┼┴─
╥┼╙╘╧╥┼
╥╬─ -- RANDOM NUMBER
╥╬─(<NUM>)
╥╬─(<START NUM>:<END NUM>)
╥╒╬ -- RUN PROGRAM NOW IN MEMORY
╥╒╬
╙┴╓┼ -- RECORD PROGRAM ON DISK
╙┴╓┼ <FILENAME>
╙┼╠┼├╘ -- CHOOSE OUTPUT LOCATION
╙┼╠┼├╘ █╧╒╘╨╒╘▌ <TYPE>
╙╟╬ -- -1 IF NEG, 0 IF 0, 1 IF POS
╙╟╬(<NUMERIC EXPRESSION>)
╙╔╬ -- GIVES SINE IN RADIANS
╙╔╬(<NUMERIC EXPRESSION>)
╙╔┌┼ -REPORT ON FREE MEMORY
╙╔┌┼
╙╤╥ -- GIVES SQUARE ROOT
╙╤╥(<NUMERIC EXPRESSION>)
╙╘┴╘╒╙$ -- STATUS OF DISK CHANNEL
╙╘┴╘╒╙$
╙╘┼╨ -INCREMENT ╞╧╥ LOOP BY THIS AMOUNT
╙╘┼╨ <NUMERIC EXPRESSION>
╙╘╧╨ -- HALT PROGRAM EXECUTION
╙╘╧╨
╙┘╙ -- TRANSFER CONTROL TO MACHINE CODE
╙┘╙(<MEMORY ADDRESS>)
╘┴┬ -- PRINT SPACES TO SPECIFIED COLUMN
╘┴┬(<COLUMN NUMBER>)
╘┴╬ -- GIVES TANGENT IN RADIANS
╘┴╬(<NUMERIC EXPRESSION>)
╘╚┼╬ -- PART OF ╔╞ STRUCTURE
╘╚┼╬
╘╧ -INCREMENT ╞╧╥ VARIABLE START ╘╧ END
<START NUM> ╘╧ <END NUM>
╘╥┴╨ -- DISABLE STOP KEY
╘╥┴╨ ┼╙├<TYPE>
╘╥╒┼ -- PREDEFINED VALUE OF 1
╘╥╒┼
╒╬╔╘ -- SPECIFY UNIT (DEVICE)
╧╨┼╬ ╞╔╠┼ <FILE#>,<FILENAM>,╒╬╔╘ <DEV>
█,<SEC ADR>▌█,<TYPE>▌
╒╬╘╔╠ -- END OF ╥┼╨┼┴╘ LOOP
╒╬╘╔╠ <EXPRESSION>
╒╙╔╬╟ --FORMATTED OUTPUT (NOT ╨┼╘ 0.14)
╨╥╔╬╘ ╒╙╔╬╟ <FORMAT>: <VAR LIST>
╫╚┼╬ -- CHOICE IN ├┴╙┼ STRUCTURE
╫╚┼╬ <LIST OF VALUES>
╫╚╔╠┼ -- START OF ╫╚╔╠┼ STRUCTURE
╫╚╔╠┼ <EXPRESSION> █─╧▌ █<STATEMENT>▌
╫╥╔╘┼ -- WRITE TO A FILE
╫╥╔╘┼ ╞╔╠┼ <FILE#>█,<REC#>▌: <VARLIST>
╧╨┼╬ █╞╔╠┼▌ <FILENUM>,<FILENAME>,╫╥╔╘┼
┌╧╬┼ -- TAB INCREMENT
┌╧╬┼ <TAB INTERVAL>
┌╧╬┼